/* --------------------------------------------------------
 * Copyright (c) aeky , Inc.  All rights reserved.
 * --------------------------------------------------------
 */
package com.aeky.client.common;

import java.util.List;
import java.util.Map;

import com.aeky.client.rpcservice.PrepareDataRPCService;
import com.aeky.client.rpcservice.PrepareDataRPCServiceAsync;
import com.aeky.model.BaseMapData;

/**
 * 
 * @author aeky
 */
public class DataUtils {

    private static PrepareDataRPCServiceAsync prepareDataService = AppParams.getService(PrepareDataRPCService.class);

    public static void prepareBasicData() {
        String loginName = "admin";
        prepareDataService.prepareBasicData(loginName, new DefaultCallback<BaseMapData>() {
            public void onSuccess(BaseMapData data) {
                List<Map<String, Object>> list = (List<Map<String, Object>>) data.get("menuNodeList");
                Registry.registry("menuNodeList", list);
            }
        });
    }
}
